/**
 *
 */
package com.xiaopan.business.blog.controller;

import com.xiaopan.business.blog.bean.SystemMenu;
import com.xiaopan.business.blog.service.CoreUserService;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

@Controller
@RequestMapping("/login")
public class LoginController extends AbstractController {

    @Resource
    CoreUserService loginService;

    private static final transient Logger LOG = Logger.getLogger(LoginController.class);

    @RequestMapping(value = "/login")
    public ModelAndView login(@RequestParam Map<String, String> allRequestParams,
                              HttpServletRequest request) {
    	String loginname = allRequestParams.get("loginname");
        String password = allRequestParams.get("password");
        String captcha = allRequestParams.get("captcha");
        String urlType = allRequestParams.get("urlType");//
        System.out.println("asdfadsf"+loginname);
        return null;
    }

    @RequestMapping(value = "/getMenu")
    public ModelAndView getMenu(@RequestParam Map<String, String> allRequestParams,
                              HttpServletRequest request) {
        List<SystemMenu> menu=loginService.selectMenus();

        System.out.println("++++++++++++++++++"+menu);
        return null;
    }


}
